package com.orange.handler;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.orange.dbhelp.page.Page;
import com.orange.modules.entity.AuthItem;
import com.orange.modules.entity.expert.AuthExpertItemMap;

public interface AuthItemService {

	public Page<AuthItem> queryAuthItemBuPage(Integer pageNum,Integer pageSize,Map<String,String> map) throws SQLException;
	
	public void insertAuthItem(AuthItem ai) throws SQLException;
	
	public void deleteAuthItem(String pid) throws SQLException;
	
	public AuthItem queryAuthItemById(String pid) throws SQLException;
	
	public List<AuthItem> queryAuthItemByFidAndMajor(String fid,String major) throws SQLException;
	
	public List<AuthItem> queryAuthItemByFid(String fid,String type) throws SQLException;
	
	public List<AuthItem> queryAuthItemTwice(String type) throws SQLException;
	
	public List<AuthItem> queryAuthItemTwice(String type,String major) throws SQLException;
	
	public List<AuthItem> queryTwiceItemLevelById(String itemId,String schoolId ,String subject) throws SQLException;
	
	/**
	 * 根据一级指标id和专业 查询所有二级指标
	 * @param fid
	 * @param major
	 * @return
	 * @throws SQLException 
	 */
	public List<AuthItem> queryAuthItemsByFidAndMajor(String fid,String major) throws SQLException;
	
	/**
	 * 根据专家id和机构id查询分项id
	 */
	public List<AuthExpertItemMap> queryAuthItemsByExpertIdAndSchoolId(String expertId,String schoolId) throws SQLException;
	
	/**
	 * 根据fid,type查询指标数据
	 * 
	 */
	public AuthItem queryAuthItemByFid1(String fid,String type) throws SQLException;

	/**
	 * 根据fid,type,major查询指标数据
	 */
	public List<AuthItem> queryAuthItemByFidAndTypeAndMajor(String fid,String type,String major,String schoolId) throws SQLException;
	
	/**
	 * 根据fid,type,major查询指标数据
	 */
	public AuthItem queryAuthItemByFidAndTypeAndMajor1(String fid,String type,String major,String schoolId) throws SQLException;
	
	/**
	 * 根据fid,type,major查询指标数据
	 */
	public List<AuthItem> queryAuthItemByFidAndTypeAndMajor2(String fid,String type,String major) throws SQLException;
	
	/**
	 * 查询一级指标和绑定的专家
	 */
	public List<AuthItem> queryAuthItemAndExpert(String schoolId) throws SQLException;
	
	/**
	 * 汇总查询
	 */
	public List<AuthItem> queryAuthCollect(String schoolId,String itemId) throws SQLException;
	
	/**
	 * 查询
	 * @throws SQLException 
	 */
	public AuthItem queryIsfollow(String schoolId,String groupId) throws SQLException;
	
	/**
	 * 查询一级指标
	 * @throws SQLException 
	 */
	public List<AuthItem> queryAuthItemIndex() throws SQLException;
}
